﻿Shader "swan/Grid"
{
	Properties
	{
		_MainTex("Texture", 2D) = "white" {}
		_Color("颜色", Color) = (1,1,1,1)
	}
	SubShader
	{
		Tags{ "QUEUE" = "Transparent" "RenderType" = "Opaque" }
		LOD 100
		
		Pass
		{
			CGPROGRAM
			#pragma vertex vert
			#pragma fragment frag

			#include "UnityCG.cginc"

			sampler2D _MainTex;
			float4 _Color;

			struct v2f
			{
				float4 pos : POSITION;
				float2 uv : TEXCOORD0;
			};

			v2f vert(appdata_base v)
			{
				v2f OUT;
				OUT.pos = mul(UNITY_MATRIX_MVP, v.vertex);
				OUT.uv = v.texcoord;
				return OUT;
			}

			fixed4 frag(v2f IN) :Color
			{
				fixed4 texCol = tex2D(_MainTex, IN.uv);
				return texCol * _Color;
			}
		ENDCG
		}
	}
}
